-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse notable addresses for Swift Assertion failure messages #188
Conversation
Source/BugsnagCrashSentry.m
Outdated
@@ -24,7 +24,7 @@ - (void)install:(BugsnagConfiguration *)config | |||
BugsnagSink *sink = [[BugsnagSink alloc] initWithApiClient:apiClient]; | |||
[BSG_KSCrash sharedInstance].sink = sink; | |||
// We don't use this feature yet, so we turn it off |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should change/remove the comment here
addresses[@"r24"] = @{ | ||
@"address": @4511084983, | ||
@"type": @"string", | ||
@"value": @"/usr/include/lib/something.swift" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any value in including these addresses in other metadata?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite possibly - I'll look into what sort of values are available for our Swift/Obj-C examples.
Enables memory introspection in KSCrash, which allows us to parse the notable addresses for Swift Assertion failure messages, as requested in #159. The message should now be captured for
fatalError
,preconditionFailure
,assertionFailure
, andassert
.This approach relies on heuristics - we'll inspect the variable values, and set the error message in the following conditions:
If this isn't the case, we won't alter the error message.